<!-- xml version="1.0" encoding="utf-8" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
	<title>A New Latin Delectus</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<link href="../flashcard.css" rel="stylesheet" type="text/css">
</head>

<script type="text/javascript">
var words = [
  ['The girl loves the boy.', 'Puella puerum amat./Puella amat puerum.'],
  ['Boys will love girls', 'Pueri puellas amabunt.'],
  ['A sparrow has shunned a eagle.', 'Passer aquilam vitavit.'],
  ['A man was shouting.', 'Homo clamabat.'],
  ['Birds fly.', 'Aves volant.'],
  ['I will not shout.', 'Ego non clamabo.'],
  ['The dog will not bark.', 'Canis non latrabit.'],
  ['Ye have not ploughed.', 'Vos non aravistis.'],
  ['I does not love thou.', 'Ego te non amo.'],
  ['Boys will pray.', 'Pueri orabunt.'],
  ['We had shunned the darts.', 'Nos tela vitaveramus.'],
  ['The man shall shout.', 'Homo clamato.'],
  ['Who would have shouted?', 'Quis clamavisset.'],
  ['The sheeps are bleating.', 'Oves balant.'],
  ['The dogs shall bark.', 'Canes latranto.'],
  ['I shall have prayed.', 'Ego oravero.'],
  ['We shall have shouted.', 'Nos clamaverimus.'],
  ['The dog will not have barked.', 'Canis non latraverit.'],
  ['Sparrows do not love the eagle.', 'Passeres aquilam non amant.'],
  ['Thou hast prayed.', 'Tu oravisti.'],
  ['The woman would have shouted.', 'Mulier clamavisset.'],
  ['No one may shun me.', 'Nemo me vitet.'],
  ['That I may shun you <span class="wl">s.</span>.', 'Ut ego te vitem.'],
  ['The eagles have flown.', 'Aquilae volaverunt.'],
  ['That the women would shun the darts.', 'Ut mulieres tela vitarent.'],
  ['Who shunned the dog?', 'Quis vitabat canem?'],
  ['Love the girl.', 'Ama puellam.'],
  ['The boys shall plough.', 'Pueri aranto.'],
  ['We may pray.', 'Oremus.'],
  ['The sheep shall bleat.', 'Oves balanto.'],
  ['Who had shunned the dog?', 'Quis ovem vitaverat?'],
  ['Ye shunned the darts.', 'Vos tela vitabatis.']
];

var shown = 0;

function updateVoc() {
	var i = Math.floor(shown / 2);

	var j = shown % 2;

	if (j == 0) {
		document.getElementById('v3').innerHTML = words[i][0];
		document.getElementById('v1').innerHTML = "";
	} else if (j == 1) {
		document.getElementById('v3').innerHTML = words[i][0];
		document.getElementById('v1').innerHTML = words[i][1];
	}
}

function next() {
	shown++;
	if (shown > words.length * 2 - 1) {
		shown = 0;
		alert('All done!');
	}
	updateVoc();
}

function prev() {
	shown--;
	if (shown < 0) {
		shown = words.length * 2 - 1;
		alert('All done!');
	}
	updateVoc();
}

shuffle = function(o){ //v1.0
    for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
    return o;
};

shuffle(words);
</script>

<body onload="updateVoc()">
<h1 style="text-align:center; color: #60B0C0;">Part II</h1>

<div class="center">
<div id="blank" class="v2">&nbsp;</div>
<div id="v3" class="v3"></div>
<div id="blank" class="v2">&nbsp;</div>
<div id="v1" class="v1"></div>


<a href="#" class="button" id="btnprev" onclick="prev()" accesskey="p">&lt;&lt;</a>
<a href="#" class="button" id="button" onclick="location.reload();">new</a>
<a href="#" class="button" id="btnnext" onclick="next()" accesskey="n">&gt;&gt;</a>


</div>
</body>
</html>
